<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib uri="/struts-tags" prefix="s" %>
	<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
	<body>
	<div class="tab_container_body_div">
	<s:form id="update_book_state" action="action_controlType" namespace="/control/book"  method="post">
		<table cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<td>
							选择
						</td>
						<td>
							Logo
						</td>
						<td>
							名称
						</td>
						<td>
							价格
						</td>
						<td>
							发布时间
						</td>
						<td>
							推荐
						</td>
						<td>
							书皇广告
						</td>
						<td>
							本店广告
						</td>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="pageView.records" status="list" var="my_book">
						<tr height="80"
							bgcolor="<s:if test="#list.odd">#ffffff</s:if><s:else>#FFD4AA</s:else>">
							<td>
								<input type="checkbox" name="bookid" value="${my_book.id }"/>
							</td>
							<td>
								<div style="display: inherit">
									<img src="${my_book.logo }" width="80" height="80"
										alt="${my_book.bookName}" />
								</div>
							</td>
							<td>
								<div class="book_name" style="display: inherit">
									<s:a  namespace="/forward/view" action="book_browse">
										<s:param name="book.id" value="#my_book.id"></s:param>
										${my_book.bookName }
									</s:a>
								</div>
							</td>
							<td>
								${my_book.price }
							</td>
							<td>
								${my_book.dateLine }
							</td>
							<td>
								<s:if test="#my_book.recommend==1">
									推荐
								</s:if>
							</td>
							<td>
								<a style="cursor: pointer;" onclick="changeCenter('/control/book/ad_apply.go','ad.id=${my_book.id}','#right_content_sell')">发送申请</a>
							</td>
							<td>
								<a style="cursor: pointer;" onclick="changeCenter('/control/book/ad_shopApply.go','ad.id=${my_book.id}&ad.book.id=${my_book.id}&ad.name=${my_book.bookName}&ad.logo=${my_book.logo_300}','#right_content_sell')">发送申请</a>
							</td>
						</tr>
					</s:iterator>
					<tr>
						<td colspan="6">
							<div style="text-align: left;">
								<input type="hidden" id="book_flag" name="flag">
								<input type="hidden" id="book_state" name="state"> 
								<input type="hidden" id="book_type" name="type"> 
								<input type="hidden" name="maxrecord" value="${maxrecord}"> 
								<input type="hidden" name="page" value="${page}"> 
								
								<input type="checkbox" onclick="SelectAll(this)">全选
								
								<input type="button" onclick="chengStateType(0,1,1)" value=" 推    荐 ">
								<input type="button" onclick="chengStateType(0,1,0)" value="取消推荐">
								<input type="button" onclick="chengStateType(1,1,2)" value=" 下  架 ">
								<input type="button" onclick="chengStateType(1,1,3)" value=" 删  除">
							</div>
						</td>
					</tr>
				</tbody>
				<tfoot>
					<tr>
						<td colspan="8">
							当前页:第${pageView.currentpage}页 | 总记录数:${pageView.totalrecord}条 | 每页显示:${pageView.maxrecord}条 | 总页数:${pageView.totalpage}页</font>　
							<br/>
							<c:forEach begin="${pageView.pageindex.startindex}" end="${pageView.pageindex.endindex}" var="page">
							    <c:if test="${pageView.currentpage==page}"><b><font color="#00ffff">${page}</font></b></c:if>
							    <c:if test="${pageView.currentpage!=page}">
							    	<a onclick="changeCenter('/control/book/action_sellBook.go','type=${type}&page=${page}','#right_content_sell')">[${page}]</a>
							    </c:if>
							</c:forEach>
						</td>
					</tr>
				</tfoot>
			</table>
			</s:form>
		</div>
	</body>
</html>